#pragma once

#include "ObjectUser.h"

class MainEntrance 
{
public:
	static vector<XMLObjectUser*>XMLOU;
	static int num;
	static int index;

	static MainEntrance* instance;
	static MainEntrance* getInstance() {
		if (instance == NULL)
		{
			instance = new MainEntrance;
			return instance;
		}
		else {
			return instance;
		}
	}
	static void addXMLObjectUser(XMLObjectUser* XML) {
		XMLOU.emplace_back(XML);
		num++;
	}
	static XMLObjectUser* getSubObject() {
		if (XMLOU.size() == 0) {
			return new XMLObjectUser;
		}
		if (index <= num)return XMLOU[index];
		return new XMLObjectUser;
	}
};

